extends Area2D


signal Sudi(body: RigidBody2D)
signal DR_JD(JD:float)

#func _draw() -> void:
	#draw_circle(Vector2.ZERO,100,Color.RED)



func game_over():
	print("不发送消息了")


func sousuo():
	print("已有")


func _on_body_entered(body: Node2D) -> void:
	print("索敌发现发送信号")
	var position = global_position
	var drposition = body.global_position
	var xd_Position = drposition - position
	print("当前位置:",position,"敌人位置",drposition,"相等位置",xd_Position)
	print("距离",drposition.distance_to(drposition),"角度", rad_to_deg(atan2(xd_Position.y,xd_Position.x)))
	DR_JD.emit(rad_to_deg(atan2(xd_Position.y,xd_Position.x)))
	#Sudi.emit(body)
